package buisness_service;

public class Finance_jour {
	private Depense_jour dep_jour;
	private Revenu_jour rev_jour;
	private int jour;
	private Finance_mois finance_mois;
	private int index_finance_jour;

	public Finance_jour(int jour, Finance_mois fin_mois, User  user) {
		this.jour = jour;
		this.setFinance_mois(fin_mois);
		user.getRapport().get(fin_mois.getIndexFinance_annee())
				.getFinances_mois().get(fin_mois.getIndex_finance_mois())
				.getFinances_jour().add(this);
		this.index_finance_jour = user.getRapport()
				.get(fin_mois.getIndexFinance_annee()).getFinances_mois()
				.get(fin_mois.getIndex_finance_mois()).getFinances_jour()
				.size() - 1;
		this.dep_jour = new Depense_jour(this, user);
		this.rev_jour = new Revenu_jour(this, user);
	}

	public Depense_jour getDep_jour() {
		return dep_jour;
	}

	public void setDep_jour(Depense_jour dep_jour) {
		this.dep_jour = dep_jour;
	}

	public Revenu_jour getRev_jour() {
		return rev_jour;
	}

	public void setRev_jour(Revenu_jour rev_jour) {
		this.rev_jour = rev_jour;
	}

	public int getJour() {
		return jour;
	}

	public void setJour(int jour) {
		this.jour = jour;
	}

	public int getIndex_finance_jour() {
		return index_finance_jour;
	}

	public void setIndex_finance_jour(int index_finance_jour) {
		this.index_finance_jour = index_finance_jour;
	}

	public Finance_mois getFinance_mois() {
		return finance_mois;
	}

	public void setFinance_mois(Finance_mois finance_mois) {
		this.finance_mois = finance_mois;
	}

}
